<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>

	</head>

	<body>
		<script>
			var now = new Date();
			document.write("今年是"+now.getFullYear()+"年<br/>");
			document.write("这个月是"+(now.getMonth()+1)+"月<br/>");
			document.write("今年是"+now.getDate()+"号<br/>");
			document.write("今天是星期"+now.getDay()+"<br/>");
			document.write("现在是"+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+"<br/>");
		</script>
		距离2008年5月12日已经过去<span id="num"></span>天.
		<script>			
			var date = new Date("2008-5-12");
			var days = (now.getTime()- date.getTime()) / (24 * 60 * 60 * 1000);
			days = Math.floor(days) + 1;
			document.getElementById("num").innerHTML = days;
		</script>
	</body>

</html>